/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.opgea.qms.domain.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Ramesh
 */
@Entity
@Table(name = "smsserver_in")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "SmsServerIn.findAll", query = "SELECT s FROM SmsServerIn s"),
    @NamedQuery(name = "SmsServerIn.findById", query = "SELECT s FROM SmsServerIn s WHERE s.id = :id"),
    @NamedQuery(name = "SmsServerIn.findByProcess", query = "SELECT s FROM SmsServerIn s WHERE s.process = :process"),
    @NamedQuery(name = "SmsServerIn.findByOriginator", query = "SELECT s FROM SmsServerIn s WHERE s.originator = :originator"),
    @NamedQuery(name = "SmsServerIn.findByType", query = "SELECT s FROM SmsServerIn s WHERE s.type = :type"),
    @NamedQuery(name = "SmsServerIn.findByEncoding", query = "SELECT s FROM SmsServerIn s WHERE s.encoding = :encoding"),
    @NamedQuery(name = "SmsServerIn.findByMessageDate", query = "SELECT s FROM SmsServerIn s WHERE s.messageDate = :messageDate"),
    @NamedQuery(name = "SmsServerIn.findByReceiveDate", query = "SELECT s FROM SmsServerIn s WHERE s.receiveDate = :receiveDate"),
    @NamedQuery(name = "SmsServerIn.findByText", query = "SELECT s FROM SmsServerIn s WHERE s.text = :text"),
    @NamedQuery(name = "SmsServerIn.findByOriginalRefNo", query = "SELECT s FROM SmsServerIn s WHERE s.originalRefNo = :originalRefNo"),
    @NamedQuery(name = "SmsServerIn.findByOriginalReceiveDate", query = "SELECT s FROM SmsServerIn s WHERE s.originalReceiveDate = :originalReceiveDate"),
    @NamedQuery(name = "SmsServerIn.findByGatewayId", query = "SELECT s FROM SmsServerIn s WHERE s.gatewayId = :gatewayId")})
public class SmsServerIn implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "process")
    private int process;
    @Basic(optional = false)
    @Column(name = "originator")
    private String originator;
    @Basic(optional = false)
    @Column(name = "type")
    private String type;
    @Basic(optional = false)
    @Column(name = "encoding")
    private char encoding;
    @Basic(optional = false)
    @Column(name = "message_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date messageDate;
    @Basic(optional = false)
    @Column(name = "receive_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date receiveDate;
    @Basic(optional = false)
    @Column(name = "text")
    private String text;
    @Column(name = "original_ref_no")
    private String originalRefNo;
    @Column(name = "original_receive_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date originalReceiveDate;
    @Column(name = "gateway_id")
    private String gatewayId;

    public SmsServerIn() {
    }

    public SmsServerIn(Integer id) {
        this.id = id;
    }

    public SmsServerIn(Integer id, int process, String originator, String type, char encoding, Date messageDate, Date receiveDate, String text) {
        this.id = id;
        this.process = process;
        this.originator = originator;
        this.type = type;
        this.encoding = encoding;
        this.messageDate = messageDate;
        this.receiveDate = receiveDate;
        this.text = text;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getProcess() {
        return process;
    }

    public void setProcess(int process) {
        this.process = process;
    }

    public String getOriginator() {
        return originator;
    }

    public void setOriginator(String originator) {
        this.originator = originator;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public char getEncoding() {
        return encoding;
    }

    public void setEncoding(char encoding) {
        this.encoding = encoding;
    }

    public Date getMessageDate() {
        return messageDate;
    }

    public void setMessageDate(Date messageDate) {
        this.messageDate = messageDate;
    }

    public Date getReceiveDate() {
        return receiveDate;
    }

    public void setReceiveDate(Date receiveDate) {
        this.receiveDate = receiveDate;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getOriginalRefNo() {
        return originalRefNo;
    }

    public void setOriginalRefNo(String originalRefNo) {
        this.originalRefNo = originalRefNo;
    }

    public Date getOriginalReceiveDate() {
        return originalReceiveDate;
    }

    public void setOriginalReceiveDate(Date originalReceiveDate) {
        this.originalReceiveDate = originalReceiveDate;
    }

    public String getGatewayId() {
        return gatewayId;
    }

    public void setGatewayId(String gatewayId) {
        this.gatewayId = gatewayId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SmsServerIn)) {
            return false;
        }
        SmsServerIn other = (SmsServerIn) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.opgea.qms.domain.entities.generated.SmsServerIn[ id=" + id + " ]";
    }
    
}
